import * as React from 'react';
import  {Menu} from "antd";
import  { Link} from 'react-router-dom';


 /**
   * 头部导航栏
   */
  function HeaderList(props){
      return (
          <div>
            <div className="logo" />
            <Menu
                theme="dark"
                mode="horizontal"
                defaultSelectedKeys={['2']}
                style={{ lineHeight: '64px' }}
            >
                    {props.routers.map((route, i) => {
                            return (
                              <Menu.Item key={route.path}><Link to={route.path}>{route.title}</Link></Menu.Item>
                            )
                    }
                )}
            </Menu>
          </div>
      );
  }

  export default HeaderList